#include "AST/ASTBuilder.cpp"
#include "Bytecode/ASTDecomposer.cpp"
#include "FileWriter/BCFileWriter.cpp"

using namespace SymphonyAST;
using namespace SymphonyBC;


int main(int argc, const char* argv[]) {
	ASTBuilder astBuilder;
	ASTDecomposer astDecomposer;

	try {
		Class* clazz = astBuilder.buildAST(argv[1]);
		ClassBC* classBC = astDecomposer.decomposeClass(clazz);
		BCFileWriter::writeClass(classBC);
	} catch(string s) {
		cout << s << endl;
	} catch(char const* s) {
		cout << s << endl;
	}
}
